<?php
$c = mysql_connect('localhost', 'root', '') or die("Connexion au serveur impossible");
mysql_select_db('sandbox') or die("Selection de la base de données impossible");

$id = $_POST['id'];
$tel = $_POST['tel'];
$email = $_POST['email'];
$internet = $_POST['internet'];

$sql = "UPDATE extractor SET telephone = '$tel', email = '$email', internet = '$internet' WHERE id = '$id'";
$result = mysql_query($sql, $c) or die("Erreur : " .  mysql_error($c));
$done = ($result) ? true : false;
mysql_close($c);

echo json_encode(array(
    'done' => $done,
    'sql' => $sql,
));